Skip to content

Conversation

@billsacks
Copy link
Member

Description of changes

(1) Add dbug_flag namelist option to control this flag in the code, rather than requiring source code changes to change this value

(2) Remove unused info_dbug flag

Specific notes

Contributors other than yourself, if any:

CMEPS Issues Fixed (include github issue #):

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial) - No

Any User Interface Changes (namelist or namelist defaults changes)?

  • Adds dbug_flag namelist variable
  • Removes unused INFO_DBUG xml variable and info_dbug namelist variable

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

Ran SMS_Ld3_D_P8x1.f10_f10_mg37.X.green_gnu with dbug_flag set at 0 (default) and 11.

This is no longer used in the code
Previously this could only be set via a code change
@billsacks billsacks requested a review from mvertens November 23, 2025 16:52
@billsacks billsacks self-assigned this Nov 23, 2025
Copy link
Collaborator

@mvertens mvertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@billsacks - this looks good - but where are the code mods that trigger of of the new config variable? Am I missing something?

@billsacks
Copy link
Member Author

where are the code mods that trigger of of the new config variable? Am I missing something?

Oh, right, sorry that I didn't point this out: I found that there was already code to handle a dbug_flag config variable, even though the dbug_flag variable wasn't actually appearing in the config file:

CMEPS/mediator/med.F90

Lines 649 to 656 in 18eb93b

! Obtain dbug_flag setting if present; otherwise use default value in med_constants
call NUOPC_CompAttributeGet(gcomp, name='dbug_flag', value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (isPresent .and. isSet) then
read(cvalue,*) dbug_flag
end if
write(msgString,'(A,i6)') trim(subname)//': Mediator dbug_flag is ',dbug_flag
call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)

(The presence of that code was part of what led me to think that the intent was that this variable should be runtime-settable.)

@mvertens
Copy link
Collaborator

@billsacks - thanks. Great that the code is already there.

@billsacks billsacks merged commit cbc1f0f into ESCOMP:main Nov 25, 2025
4 checks passed
@billsacks billsacks deleted the dbug_flag branch November 25, 2025 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistency between info_dbug and dbug_flag

2 participants